import express from 'express';
import multer from 'multer';
import { translateFile } from '../controllers/translationController';
import { testTranslate } from '../controllers/testController';

const router = express.Router();
const upload = multer({ dest: 'uploads/' });

// 上传文件并翻译
router.post('/translate', upload.single('file'), translateFile);

// 测试翻译API
router.post('/test', testTranslate);

export default router;